package com.hl.web.fore;

import com.hl.pojo.ChargeStandard;
import com.hl.service.ChargeStandardService;
import com.hl.util.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/chargeStandard")
public class ChargeStandardController {
    @Autowired
    private ChargeStandardService chargeStandardService;
    @RequestMapping("/add")
    public ResultEntity add(@RequestBody ChargeStandard chargeStandard){
        chargeStandardService.add(chargeStandard);
        return ResultEntity.ok();
    }
    @RequestMapping("/del")
    public ResultEntity del(@RequestBody ChargeStandard chargeStandard){
        chargeStandardService.del(chargeStandard);
        return ResultEntity.ok();
    }
    @RequestMapping("/findByType")
    public ResultEntity findByType(ChargeStandard chargeStandard){

        return ResultEntity.ok(chargeStandardService.findByType(chargeStandard));
    }
    @RequestMapping("/findByConsultant")
    public ResultEntity findByConsultant(ChargeStandard chargeStandard){

        return ResultEntity.ok(chargeStandardService.findByConsultant(chargeStandard));
    }
}
